how to implement star pattern using c